#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2018/12/5 1:32
# @Author  : lizhen
# @Site    : 
# @File    : cFeature.py
# @Software: PyCharm


class FeatureDemo:
    def __init__(self):
        pass

    def _test_innerfunc(self):
        """
        fd = FeatureDemo()
        fd._test_innerfunc()
        """
        def append_num(data, num):
            data.append(num)

        data = [1, 2, 3]
        append_num(data, 4)
        assert data == [1, 2, 3, 4]

    def _test_list(self):
        """
        fd = FeatureDemo()
        fd._test_list()
        """
        a1 = [1, 2, 3]
        a2 = a1
        a3 = list(a1)
        assert a2 is a1
        assert a3 is not a1

    def _test_constant(self):
        """
        fd = FeatureDemo()
        fd._test_constant()
        """
        a1 = None
        a2 = True
        a3 = False
        assert a1 is None
        assert a2 is True
        assert a3 is False


if __name__ == '__main__':
    fd = FeatureDemo()
    fd._test_constant()
